package com.ruoyi.admin.domain.vo.request.inventory;

import com.ruoyi.admin.domain.entity.InventoryModel;
import com.ruoyi.common.page.PageParamRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.beans.BeanUtils;

import java.math.BigDecimal;


/**
 * 库存分页返回数据格式
 *
 * @author jianhan
 * @date 2022-12-07 15:41:39
 */
@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
public class InventoryPageRequest extends PageParamRequest {


    @ApiModelProperty(value = "主键")
    private Long id;

    @ApiModelProperty(value = "货号id")
    private Long atricleId;

    @ApiModelProperty(value = "客户供应商id")
    private Long supplierId;

    @ApiModelProperty(value = "品牌名称")
    private String brand;

    @ApiModelProperty(value = "货号")
    private String atricleNumber;

    @ApiModelProperty(value = "码数")
    private String size;

    @ApiModelProperty(value = "库存数量")
    private Long number;

    @ApiModelProperty(value = "总价")
    private BigDecimal totalPrice;

    @ApiModelProperty(value = "平均单价")
    private BigDecimal price;

    @ApiModelProperty(value = "备注")
    private String remark;


    /**
     * 获取实体对象
     *
     * @return 对象
     * @author jianhan
     * @date 2022-12-07 15:41:39
     **/
    @ApiModelProperty(hidden = true)
    public InventoryModel getInventoryModel() {
        InventoryModel inventoryModel = new InventoryModel();
        BeanUtils.copyProperties(this, inventoryModel);
        return inventoryModel;
    }

}
